package net.zdreamer.geracomium.ui.more;

import net.zdreamer.geracomium.ui.BaseActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.Toast;

import com.example.geracomium.R;

public class EditbedInfoActivity extends BaseActivity implements
		OnClickListener {
	private EditText edit_building, edit_floor, edit_roomnumber,
			edit_bednumber;
	private String BedInfo;

	@Override
	protected int getContentView() {
		return R.layout.activity_editbedinfo;

	}

	@Override
	protected void init() {
		edit_building = (EditText) findViewById(R.id.edit_building);
		edit_floor = (EditText) findViewById(R.id.edit_floor);
		edit_roomnumber = (EditText) findViewById(R.id.edit_roomnumber);
		edit_bednumber = (EditText) findViewById(R.id.edit_bednumber);
	}

	@Override
	protected void initViews() {
		initTitle("个人资料", R.drawable.selector_title_back,
				R.drawable.seletor_save, true, true);
		if (edit_building.getText().toString() == "") {
			Toast.makeText(EditbedInfoActivity.this, "请输入楼栋信息",
					Toast.LENGTH_LONG).show();
		} else if (edit_floor.getText().toString() == "") {
			Toast.makeText(EditbedInfoActivity.this, "请输入楼层信息",
					Toast.LENGTH_LONG).show();
		} else if (edit_roomnumber.getText().toString() == "") {

			Toast.makeText(EditbedInfoActivity.this, "请输入房间号",
					Toast.LENGTH_LONG).show();
		} else if (edit_bednumber.getText().toString() == "") {
			Toast.makeText(EditbedInfoActivity.this, "请输入床位号",
					Toast.LENGTH_LONG).show();
		} else {
			BedInfo = edit_building.getText().toString()
					+ edit_floor.getText().toString()
					+ edit_roomnumber.getText().toString()
					+ edit_bednumber.getText().toString();
		}
	}

	@Override
	protected void initListener() {
		findViewById(R.id.back).setOnClickListener(this);
		findViewById(R.id.share).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.back:
			break;
		case R.id.share:
			break;
		default:
			break;
		}
	}

}
